<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/**
 * @var $router \Laravel\Lumen\Routing\Router
 */
$router->get('/', function () {
    return "hello";
})->name('hello');

$router->group(['prefix' => '/v1/client'], function () use ($router) {
    /**
     * 拼多多
     */
    $router->get('/search_auth', 'Client\PddController@searchAuth')->name('auth.search');
    // 生成授权链接
    $router->get('/set_auth', 'Client\PddController@setAuth')->name('auth.set');
    // 注册
    $router->post('/register', 'Client\MemberController@register')->name('member.register');
    // 登录
    $router->post('/login', 'Client\MemberController@login')->name('member.login');
    // 设置链接
    $router->post('/set_link', 'Client\ProductController@setLink')->name('product.setLink');
    //获取商品列表
    $router->post('/get_product_list', 'Client\ProductController@getProductList')->name('product.getProductList');
    // 获取商品详情
    $router->post('/get_product_info', 'Client\ProductController@getProductInfo')->name('product.getProductInfo');
    // 获取订单列表
    $router->post('/get_order_list', 'Client\OrderController@getOrderList')->name('order.getOrderList');
    // 获取订单详情
    $router->post('/get_order_info', 'Client\OrderController@getOrderInfo')->name('order.getOrderInfo');
});
